package thousandSeparator;

public class Solution {
    public String thousandSeparator(int n) {
        int t = 0;
        if(n == 0 )return "0";
        String ans = new String();
        // 得到每一位
        while (n>0){
            if(t == 3){
                ans = "."+ans;
            }
            ans = Integer.toString(n%10)+ans;
            n/=10;
        }
        return ans;
    }
}
